package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

/**
 * 销售信息实体类
 */
@TableName("t_sell")
public class SellBean {
    /**
     * 编号
     */
    @TableId(value = "pk_sellId", type = IdType.AUTO)
    private Integer id;
    /**
     * 销售员
     */
    @TableField(value = "s_user")
    private String user;
    /**
     * 销售日期
     */
    @TableField(value = "s_date")
    private LocalDate date = LocalDate.now();
    /**
     * 地址
     */
    @TableField(value = "s_address")
    private String address;
    /**
     * 销售商品集合
     */
    @TableField(exist = false)
    private List<SellInfoBean> sellInfoList;
    /**
     * 销售总金额
     */
    @TableField(value = "s_totalPrice")
    private Integer totalPrice;
    /**
     * 所属客户id
     */
    @TableField(value = "fk_cilentId")
    private Integer clientId;
    /**
     * 所属客户
     */
    @TableField(exist = false)
    private ClientBean clientBean;

    public SellBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public List<SellInfoBean> getSellInfoList() {
        return sellInfoList;
    }

    public void setSellInfoList(List<SellInfoBean> sellInfoList) {
        this.sellInfoList = sellInfoList;
    }

    public Integer getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Integer totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Integer getClientId() {
        return clientId;
    }

    public void setClientId(Integer clientId) {
        this.clientId = clientId;
    }

    public ClientBean getClientBean() {
        return clientBean;
    }

    public void setClientBean(ClientBean clientBean) {
        this.clientBean = clientBean;
    }

    @Override
    public String toString() {
        return "SellBean{" +
                "id=" + id +
                ", user='" + user + '\'' +
                ", date=" + date +
                ", address='" + address + '\'' +
                ", sellInfoList=" + sellInfoList +
                ", totalPrice=" + totalPrice +
                ", clientId=" + clientId +
                ", clientBean=" + clientBean +
                '}'+"\n";
    }
}
